<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>overflow:hidden,height:0隐藏失效的情形-应用：侧边栏导航</title>
        <style>
            .hide{
                overflow: hidden;
                height: 0;
            }
            .bg-red{
                background-color: #f00;
            }
            .box-600-1400{
                width: 600px;
                height: 1400px;
            }
            .block-center{
                margin:0 auto;
            }
            .ta-r{
                text-align: right;
            }
            .box-20{
                width: 20px;
                padding: 5px 0;
                background:#0fc;
                position: fixed;
                bottom: 100px;
                text-align: center;
            }
            .box-test{
                width: 20px;
                padding: 5px 0;
                background:#0fc;
                position: absolute;
                text-align: center;
            }
            .box-wrap{
                border:2px solid #fff;
                background:#ff0;
            }
        </style>
    </head>
    <body>
        <!-- <div class="box-600-1400 block-center bg-red">
            <div class="ta-r">
                &nbsp;<div class="box-20">回到顶部</div>
            </div>
        </div> -->
        <div class="box-600-1400 block-center bg-red">
            <div class="ta-r box-wrap hide">
                &nbsp;<a href="javascript:;" class="box-test">回到顶部</a>
            </div>
            <!-- <div class="ta-r box-wrap">
                &nbsp;<a href="javascript:;" class="box-test">回到顶部</a>
            </div> -->
        </div>
    </body>
</html>